const add = (...args) => args.reduce((sum, num) => sum + num, 0);  
console.log(add(1, 2, 3, 4)); // 输出 10